//
//  SurpriseShopDetailMiddleCell.swift
//  XiaoJingMallSwift
//
//  Created by beisheng03 on 2017/8/14.
//  Copyright © 2017年 beisheng. All rights reserved.
//

import UIKit

class SurpriseShopDetailMiddleCell: BaseTableViewCell {

    @IBOutlet weak var bgView: UIView!
    
    var model : SurpriseShopDetModel?
    
    override func awakeFromNib() {
        super.awakeFromNib()
        contentView.backgroundColor = UIColor.viewBgGrey()
        
        bgView.addCornerAndBorder(borderColor: nil, borderWidth: 0, masksToBounds: true, cornerRadius: 10)
    }
    
    
    
    @IBAction func leftBtnDidTap(_ sender: UIButton) {
        
        if model == nil {
            return
        }
        
        let temp = GoodsDetailController()
        
        temp.urlStr = model!.detail_url
        
        viewController().navigationController?.pushViewController(temp, animated: true)
        

    }
    
    
    @IBAction func middleBtnDidTap(_ sender: UIButton) {
        
        if model == nil {
            return
        }
        
        let temp = EventsAnnouncedVC()
        
        temp.goodsId = model!.goods_id
        
        viewController().navigationController?.pushViewController(temp, animated: true)
        
        
    }
  
    
    @IBAction func rightBtnDidTap(_ sender: UIButton) {
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    
}
